'use strict';

const Controller = require('egg').Controller;
const {ObjectId}= require("mongodb");
class ArticleController extends Controller {
  async find(id=null) {
    var db =  this.app.mongodb;
    var res = await db.collection("article").find({_id:ObjectId(id)}).toArray();
    return res;
  }
}

module.exports = ArticleController;
